# %% md

##学习笔记：
##1.注册GitHub education packages
##2.pycharm官网下载及jupyter notebook的安装使用

# %%

from datetime import datetime

odds = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
        59]

right_this_minute = datetime.today().minute

if right_this_minute in odds:
    print("This minute seems a little odd.")
else:
    print("Not an odd minute.")

# %%

from os import getcwd

where_am_I = getcwd()

# %%

import sys

sys.platform
'drawin'

# %%

print(sys.version)

# %%

import os

os.getcwd()

# %%

os.environ

# %% md

##第一部分：观察标准库，了解变量

# %%

import datetime

datetime.date.today()

# %%

datetime.date.today().day

# %%

datetime.date.today().month

# %%

datetime.date.today().year

# %%

datetime.date.isoformat(datetime.date.today())

# %%

import time

time.strftime("%H:%M")

# %%

import time

time.strftime("%A %p")

# %% md


##从奇数中选择对应的时间节点

# %%

from datetime import datetime

odds = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
        59]

time_now = datetime.today()
right_this_minute = time_now.minute

if right_this_minute in odds:
    print("This minute seems a little odd.")
else:
    print("Not an odd minute.")

# %%

import time

today = time.strftime("%a")
if today == 'saturday':
    print('party!!')
elif today == 'sunday':
    print('recover.')
else:
    print('work,work,work.')

# %%

21 + 21

# %%

ultimate_answer = 21 + 21
ultimate_answer

# %%

for i in [1, 2, 3]:
    print(i)

# %%

for ch in "hi!":
    print(ch)

# %%

for num in range(5):
    print('go go go!')

# %% md


##啤酒墙

# %%

word = "bottles"
for beer_num in range(99, 0, -1):
    print(beer_num, word, "of beer on the wall.")
    print(beer_num, word, "of beer.")
    print("take one down.")
    print("pass it around.")
    if beer_num == 1:
        print("no more bottles of beer on the wall.")
    else:
        new_num = beer_num - 1
        if new_num == 1:
            word = "bottle"
            print(new_num, word, "of beer on the wall.")
            print()

# %%

range(5)

# %%

list(range(5))

# %%

list(range(5, 10))

# %%

list(range(10, 2, -1))

# %%


